package n9;

import org.junit.jupiter.api.Test;

public class Main1 {

    public static boolean isPalindrome(int x) {
        String str = String.valueOf(x);
        StringBuffer stringBuffer = new StringBuffer(str);
        return str.equals(stringBuffer.reverse().toString());
    }

    @Test
    public void test1() {
        int[] testNum = {121, -121, 10};
        for (int i : testNum) {
            System.out.println(isPalindrome(i));
        }
    }
}
